home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / tcp_ip / wnos / wn941101 / ftpcli.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-10  |  1.3 KB  |  47 lines

  1. #ifndef    _FTPCLI_H
  2. #define    _FTPCLI_H
  3.  
  4. #include <stdio.h>
  5.  
  6. #ifndef    _FTP_H
  7. #include "ftp.h"
  8. #endif
  9.  
  10. #ifndef _SESSION_H
  11. #include "session.h"
  12. #endif
  13.  
  14. #define    LINELEN            256    /* Length of user command buffer */
  15. #define CTLZ            26    /* EOF for CP/M systems */
  16.  
  17. /* Per-session FTP client control block */
  18. struct ftpcli {
  19.     int control;            /* Control socket */
  20.     int data;                /* Data socket */
  21.  
  22.     char state;
  23. #define    COMMAND_STATE    0    /* Awaiting user command */
  24. #define    SENDING_STATE    1    /* Sending data to user */
  25. #define    RECEIVING_STATE    2    /* Storing data from user */
  26.  
  27.     int16 verbose;            /* Transfer verbosity level */
  28. #define    V_QUIET            0    /* Error messages only */
  29. #define    V_SHORT            1    /* Final message only */
  30. #define    V_NORMAL        2    /* display control messages */
  31. #define    V_HASH            3    /* control messages, hash marks */
  32. #define V_BYTE            4    /* control messages, byte count */
  33.  
  34.     int batch;                /* Command batching flag */
  35.     int abort;                /* Aborted transfer flag */
  36.     char type;                /* Transfer type */
  37.     char typesent;            /* Last type command sent to server */
  38.     int logbsize;            /* Logical byte size for logical type */
  39.     FILE *fp;                /* File descriptor being transferred */
  40.  
  41.     struct session *session;
  42.     char *password;
  43. };
  44. #define    NULLFTP    (struct ftpcli *)0
  45.  
  46. #endif    /* _FTPCLI_H */
  47.